function changeBac(remark,content){
	changeBackGround(remark);
	changeServerBac(remark,content);
}

function changeBackGround(color){
	$('body').css('background','#edf8ec url("/TopNews/images/news/bac_mood/'+color+'.gif") repeat-y');
}

function changeServerBac(remark,content){
	addActionRecord('',content,remark,1);
}


function addActionRecord(action,content,remark,type){
	$.ajax({
			url: "addActionRecord.do",
			type:'post',
			data: 'type='+type+'&action='+action+'&content='+content+'&remark='+remark,
			success: function() {
				window.frames['mrightFrame'].location.reload();
			}
	})
}

function load(){
	$.ajax({
			url: "searchRemark.do",
			type:'post',
			success: function(data) {
				changeBackGround(data);
			}
	})
}

$(function(){
	$('#dialog').dialog({
				autoOpen: false,
				width: 600,
				buttons: {
					"Ok": function() { 
						$(this).dialog("close"); 
					}, 
					"Cancel": function() { 
						$(this).dialog("close"); 
					} 
				}
			});
				
	$('#dialog_link').click(function(){
		$('#dialog').dialog('open');
		return false;
	});
	$('#ceshiw_link').click(function(){
		window.mleftFrame.location.href = "http://www.baidu.com";
	});
//window.mleftFrame.ceshi();
//window.iframeName.location.href = "test.aspx?num="+ num
//window.parent.ceshiw();
//window.parent.document.getElementById("dialog_link").contentWindow.test2();
	
});

function ceshiw(param){
alert("iframe调用外部方法;参数为："+param);	
}